package bs.app.Client;

import bs.app.Main.CCanvas;
import bs.app.Res.CRess;

public class Pointer {
	public Pointer() {

	}

	public static int SelectSoftKey(int x, int y) {	
		int yy = CCanvas.s_iHcanvas	- CRess.menubar.getHeight() - 5;
		int wd4 = CCanvas.s_iWcanvas / 4;		
		if (y >= yy && y <= CCanvas.s_iHcanvas) {
			if (x >= 0 && x <  wd4) {
				return 0; // left
			} else if (x >=  wd4 && x <  wd4*2) {
				return 1; // fire left
			} else if (x >= wd4*2 && x <  wd4*3){
				return 2;	//fire right 
			}else if (x >= wd4*3 && x < CCanvas.s_iWcanvas) {
				return 3; // right
			}
		}		
		return -1;		
	}
}
